import java.util.Scanner;


/**
 * @author soffo
 *
 */
public class VideoCopyInputValidator {

	Scanner scanner = new Scanner(System.in);

	public void valiateAddVideCopyInput(VideoCopyModel copyModel)
	{
		copyModel = new VideoCopyModel();
		System.out.println("Please Enter Title of the video copy");
		copyModel.setTitle(scanner.next().toString());
		System.out.println("Please Enter Category of the video copy");
		copyModel.setCategory(scanner.next().toString());
		System.out.println("Please Enter the video copy's number");
		copyModel.setVideoCopyNumber(Integer.parseInt(scanner.next().toString()));
		System.out.println("Please Enter the number of the video copies");
		copyModel.setNumOfCopies(Integer.parseInt(scanner.next().toString()));
		System.out.println("video copy checked out ?");
		copyModel.setCheckOut(Boolean.parseBoolean(scanner.next().toString()));
		System.out.println("Please Enter the price");
		copyModel.setPrice(Double.parseDouble(scanner.next().toString()));
	}

	public static Boolean isNumber(String value)
	{
		boolean flag = false;
		for(int i = 0; i < value.length();i++)
		{
			flag = Character.isDigit(value.charAt(i));

		}

		if (flag == false)
		{
			return false;
		}

		return true;
	}
}
